package com.boot.boot2.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Created by Wuxiang on 2018/5/8
 */
@Component
public class PersonProperties {

    @Value("${person.name}")
    private String name;

    @Value("${person.address:default}")
    private String address;

    @Value("${person.age:18}")
    private int age;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }
}
